<div class="container">
    <div class="page-header">
        <h1>
            {{vm.category.name}}
        </h1>
    </div>
    <div class="row" ng-repeat="product in vm.products" ng-if="$index % 3 == 0">
        <div class="col-sm-4 well" >
            <div class="row">
                <div class="col-sm-5">
                    <img ng-src="{{image.url}}" ng-click="utility.showModalImage(image.url)"  ng-repeat="image in vm.products[$index].images" class="img-thumbnail rj-link" ng-if="$index==0">
                </div>
                <div class="col-sm-7">
                    <h3>{{vm.products[$index].name}}</h3>
                    <span>价格：</span><span>{{vm.products[$index].price | currency:'￥'}}</span><p/>
                    <span>原价：</span><span><small>{{vm.products[$index].old_price | currency:'￥'}}</small></span><p/>
                    <div>{{vm.products[$index].summary}}</div><p/>
                    <button class="btn btn-warning" ng-click="vm.addToCart(vm.products[$index]);">
                        加入购物车
                    </button>
                    <a class="btn btn-warning" href="{{'#/product/' + vm.products[$index].id}}">详情</a>
                </div>
            </div>
        </div>
        <div class="col-sm-4 well" ng-if="$index + 1 < vm.products.length">
            <div class="row " >
                <div class="col-sm-5">
                    <img ng-src="{{image.url}}" ng-click="utility.showModalImage(image.url)"  ng-repeat="image in vm.products[$index + 1].images" class="img-thumbnail rj-link" ng-if="$index==0">
                </div>
                <div class="col-sm-7">
                    <h3>{{vm.products[$index + 1].name}}</h3>
                    <span>价格：</span><span>{{vm.products[$index + 1].price | currency:'￥'}}</span><p/>
                    <span>原价：</span><span><small>{{vm.products[$index + 1].old_price | currency:'￥'}}</small></span><p/>
                    <div>{{vm.products[$index + 1].summary}}</div><p/>
                    <button class="btn btn-warning" ng-click="vm.addToCart(vm.products[$index + 1]);">
                        加入购物车
                    </button>
                    <a class="btn btn-warning" href="{{'#/product/' + vm.products[$index + 1].id}}">详情</a>
                </div>
            </div>
        </div>
        <div class="col-sm-4 well" ng-if="$index + 2 < vm.products.length">
            <div class="row" >
                <div class="col-sm-5">
                    <img ng-src="{{image.url}}" ng-click="utility.showModalImage(image.url)"  ng-repeat="image in vm.products[$index + 2].images" class="img-thumbnail rj-link" ng-if="$index==0">
                </div>
                <div class="col-sm-7">
                    <h3>{{vm.products[$index + 2].name}}</h3>
                    <span>价格：</span><span>{{vm.products[$index + 2].price | currency:'￥'}}</span><p/>
                    <span>原价：</span><span><small>{{vm.products[$index + 2].old_price | currency:'￥'}}</small></span><p/>
                    <div>{{vm.products[$index + 2].summary}}</div><p/>
                    <button class="btn btn-warning" ng-click="vm.addToCart(vm.products[$index + 2]);">
                        加入购物车
                    </button>
                    <a class="btn btn-warning" href="{{'#/product/' + vm.products[$index + 2].id}}">详情</a>
                </div>
            </div>
        </div>
    </div>
</div>